package com.sparrow.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.sparrow.domain.Panda;

@Mapper
public interface PandaMapper {

	@Select("SELECT * FROM PANDA WHERE NAME = #{name}")
	Panda findByName(@Param("name") String name);
	
	@Insert("INSERT INTO PANDA(NAME, AGE) VALUES(#{name}, #{age})")
	int insert(@Param("name") String name, @Param("age") Integer age);
}
